package com.woniu.controller.advice;
import com.woniu.entity.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
@Slf4j
public class ExceptionAdvice {
    @ExceptionHandler
    public Result exceptionResole(Exception exception){
        log.debug("系统出bug了，exception ===== " + exception.getMessage());
        return new Result(false, "系统繁忙, 请稍后再试", null);
    }
}